package com.kelvin.paopao.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kelvin.paopao.R;
import com.kelvin.paopao.api.responseBean.TagModel;

/**
 * Created by Administrator on 2017/6/13.
 */

public class SetTagAdapter extends BaseQuickAdapter<TagModel, BaseViewHolder> {
    private Context context;

    public SetTagAdapter(Context context) {
        super(R.layout.recyclerview_set_tag_item);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, TagModel item) {
        helper.setText(R.id.tv_name, item.getLbName());
        ImageView iv = helper.getView(R.id.iv_select);
        if (item.isSelected()) {
            iv.setVisibility(View.VISIBLE);
        } else {
            iv.setVisibility(View.GONE);
        }
    }
}
